#!/usr/bin/python
# -*- coding: utf-8 -*-
# @Time    : 2021/7/4 18:08
# @Author  : Aaron
# @File    : add_member_page
# @Software: PyCharm
from calculator_pytest.po.base_page import BasePage


class AddMemberPage(BasePage):

    # 添加成员
    def edit_member(self, username, accout_number, email):
        from calculator_pytest.po.contact_page import ContactPage
        self.driver.find_element_by_css_selector(
            "#username").send_keys(username)

        self.driver.find_element_by_css_selector(
            "#memberAdd_acctid").send_keys(accout_number)

        self.driver.find_element_by_css_selector(
            "#memberAdd_mail").send_keys(email)

        self.driver.find_element_by_css_selector(
            "div:nth-child(3) > a.qui_btn.ww_btn.js_btn_save").click()

        return ContactPage(self.driver)
